/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-12-15 15:21:28
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 品牌查询
export const getbrands = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/brands`, {params})
// 品牌新增
export const postBrands = (params) => axios.post(`${SERVER.BASEDATA}/vehicleProduct/brands`, params)
// 品牌修改
export const putBrands = (params) => axios.put(`${SERVER.BASEDATA}/vehicleProduct/brands/${params.brandId}`, params)
// 车系查询
export const getSeriess = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/seriess`, {params})
// 车系新增
export const postSeriess = (params) => axios.post(`${SERVER.BASEDATA}/vehicleProduct/seriess`, params)
// 车系修改
export const putSeriess = (params) => axios.put(`${SERVER.BASEDATA}/vehicleProduct/seriess/${params.seriesId}`, params)
// 车型查询
export const getModels = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/models`, { params })
// 车型新增
export const postModels = (params) => axios.post(`${SERVER.BASEDATA}/vehicleProduct/models`, params)
// 车型修改
export const putModels = (params) => axios.put(`${SERVER.BASEDATA}/vehicleProduct/models/${params.modelId}`, params)
// 配置查询
export const getPackages = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/packages`, { params })
// 配置修改
export const postPackages = (params) => axios.post(`${SERVER.BASEDATA}/vehicleProduct/packages`, params)
// 配置修改
export const putPackages = (params) => axios.put(`${SERVER.BASEDATA}/vehicleProduct/packages/${params.packageId}`, params)
// 选装查询
export const getoptions = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/options`, { params })
// 选装新增
export const postoptions = (params) => axios.post(`${SERVER.BASEDATA}/vehicleProduct/options`, params)
// 选装修改
export const putoptions = (params) => axios.put(`${SERVER.BASEDATA}/vehicleProduct/options/${params.optionId}`, params)
// 品牌列表
export const getAllbrand = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/queryBrandDictAll`, { params })
// 车系列表
export const getAllseriess = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/brandsdict/${params.brandId}/seriessdictAll`, { params })
// 车型列表
export const getAllmodels = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/brandsdict/${params.brandId}/seriessdictAll/${params.seriesId}/modelsdictAll`, { params })
// 配置列表
export const getAllpackage= (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/brandsdict/${params.brandId}/seriessdictAll/${params.seriesId}/modelsdictAll/${params.modelId}/packagedictAll`, {params})
// 查询所有员工
export const getDealerUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);
